Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@architect/asap
Advanced tools
Architect Static Asset Proxy (ASAP) - a helpful library for Lambda-based static asset delivery
Architect Static Asset Proxy (ASAP) - a helpful library for Lambda-based static asset delivery
Call ASAP within your handler function manually like so:
let asap = require('@architect/asap')
// All config is optional!
module.exports = asap({
// Alias assets to different filenames
alias: {
'/an-asset.jpg': '/a-different-filename.jpg',
'/a-path': '/a-different-path',
},
// Pass your own fingerprinted static asset manifest (defaults to Arc-generated static.json)
assets: { 'some-file.gif': 'some-file-a1b2c3.gif' },
// Set a custom bucket configuration (defaults to Arc-generated buckets)
bucket: {
staging: 'staging-bucket-name',
production: 'production-bucket-name',
folder: 'some-bucket-subfolder',
},
// Override the content-aware cache-control header
cacheControl: 'max-age=0',
// Manually set response headers
headers: { 'some-header': 'ok=true' },
// Return null if asset is not found (defaults to `false`)
passthru: true,
// Engage SPA mode (defaults to `false`)
spa: false,
})
Use ASAP as the handler for your Lambda! If you're using Architect, this is done automatically for you when you don't define a root handler for your @http
pragma.
If using ASAP with non-Architect projects, just point your Lambda's source directory to src/
, and make sure you set the following two env vars:
ARC_ENV
: staging
or production
ARC_STATIC_BUCKET
: the S3 bucket name where your assets are storedFAQs
Architect Static Asset Proxy (ASAP) - a helpful library for Lambda-based static asset delivery
The npm package @architect/asap receives a total of 7,331 weekly downloads. As such, @architect/asap popularity was classified as popular.
We found that @architect/asap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.